// --------scss variables(尽量定义css变量，js修改更方便，src/styles/css-variables.css)--------
// $testHeight: 50px;

//navbar
$navBarHeight: var(--nav-bar-height);
//tagsView
$tagViewHeight: 44px;
//app-main padding
$appMainPadding: 10px;
// 命名空间,为了微前端嵌入不相互影响,可能会有部分组件未适配,如果十分影响还原为el,等官方fix
$namespace: 'el-test';
$B: null;
$E: null;
// --------global mixins--------
@use 'sass:math';
/* 清除浮动 */
@mixin clearfix {
  &::after {
    content: '';
    display: table;
    clear: both;
  }
}

@mixin triangle($width, $height, $color, $direction) {
  $width: math.div($width, 2);
  $color-border-style: $height solid $color;
  $transparent-border-style: $width solid transparent;
  height: 0;
  width: 0;

  @if $direction==up {
    border-bottom: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  } @else if $direction==right {
    border-left: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  } @else if $direction==down {
    border-top: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  } @else if $direction==left {
    border-right: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }
}

@mixin ellipsis($clamp: 1) {
  overflow: hidden;
  text-overflow: ellipsis;
  @if ($clamp == 1) {
    white-space: nowrap;
  } @else {
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: $clamp;
    -webkit-box-orient: vertical;
  }
}

@mixin mediaWidth($maxWidth: 0, $minWidth: 0) {
  @if ($maxWidth !=0 and $minWidth !=0) {
    @media only screen and (min-width: $minWidth) and (max-width: $maxWidth) {
      @content;
    }
  } @else if($maxWidth !=0) {
    @media only screen and (max-width: $maxWidth) {
      @content;
    }
  } @else if($minWidth !=0) {
    @media only screen and (min-width: $minWidth) {
      @content;
    }
  }
}

// --------global functions--------
@function px($px) {
  @return $px + PX;
}
